package com.sentiment.algorithm;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.TreeMap;

/**
 * Created by vani:liaozhenlin on 15-4-12.
 * If you meet any question,you can email at 939899727@qq.com
 *
 */
public class SimilarPair {
    private int blockNumber;
    private TreeMap<String,ArrayList<Integer>> candidatePair;
    public SimilarPair(int blockNumber){
        this.blockNumber=blockNumber;
        candidatePair=new TreeMap<String, ArrayList<Integer>>();
    }


    public void write(){
//        Set<Entry<String,ArrayList<Integer>>> sets = candidatePair.entrySet();
//        Iterator<Entry<String,ArrayList<Integer>>> it = sets.iterator();
//        while (it.hasNext()){
//            Entry<String,ArrayList<Integer>> en = it.next();
//            ArrayList<Integer> integers = en.getValue();
//            for (Integer i:integers){
//                System.out.println(i);
//            }
//        }

        HashSet<String> h=new HashSet<String>(candidatePair.keySet());
        for(String str:h){
            System.out.println(candidatePair.get(str));
//            System.out.println(str);
        }
    }
    public int getBlockNumber() {
        return blockNumber;
    }

    public void setBlockNumber(int blockNumber) {
        this.blockNumber = blockNumber;
    }

    public TreeMap<String, ArrayList<Integer>> getCandidatePair() {
        return candidatePair;
    }

    public void setCandidatePair(TreeMap<String, ArrayList<Integer>> candidatePair) {
        this.candidatePair = candidatePair;
    }
}
